﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DownloadAdd.aspx.cs" Inherits="CJJCH.Web.Manage.DownloadAdd"
    ValidateRequest="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../DemoSwfUpload/css.css" rel="stylesheet" type="text/css" />
 <link href="../Style/SystemCss.css" rel="stylesheet" type="text/css" />
    <script src="../JScript/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="../JScript/Calendar/WdatePicker.js" type="text/javascript"></script>
    <script src="../Script/JQcheck.js" type="text/javascript"></script>
    <script src="../ckeditor/ckeditor.js" type="text/javascript"></script>



    <script language="javascript" type="text/javascript">
        function checkform() {
            if (IsNothing($("#txtDataTitle"), "请输入标题！")) {
                return false;
            }
            if (IsNothing($("#hdSaveFilePath"), "请上传文件！")) {
                return false;
            }
            if (IsNothing($("#txtPlusDate"), "请选择发布日期！")) {
                return false;
            }
            else if (checkdate($("#txtPlusDate"), "请选择正确的发布日期！")) {
                return false;
            }
//            if (CKEDITOR.instances.txtNote.getData() == "") {
//                alert("请输入下载内容！");
//                return false;
//            }

            if (IsNothing($("#txtTrans"), "请输入排序号！")) {
                return false;
            }
            else if (checkdigit($("#txtTrans"), "显示排序请输入数字！")) {
                return false;
            }
            if (document.getElementById('type').style.display != "none") {
                if (IsNothing($("#dropStandardsType"), "请选择所属类型！")) {
                    return false;
                }

                if (checkdigit(($("#dropStandardsType")), "所属类型选择有误！")) {
                    return false;
                }
            }
            return true;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="BodyRight" style="width: 100%;">
        <div class="BoxHeader_Test" id="div1" runat="server">
            <div>
                <uc:DownloadTop ID="DownloadTop1" runat="server" IIndex="2" />
            </div>
            <div runat="server" id="divHidden" visible="false">
                <asp:Label ID="lblSecondId" runat="server"></asp:Label>
                <asp:Label ID="lblFirstID" runat="server"></asp:Label>
                <asp:Label ID="lblSecondName" runat="server"></asp:Label>
            </div>
            <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
                <tr>
                    <td width="1" height="100%" class="Left">
                    </td>
                    <td height="100%" valign="top">
                        <%-- <div class="RBodyTable_x3 Link_font" style="width: 98%; margin: 10px auto;">--%>
                        <table cellpadding="0" cellspacing="0" class="add_table" style="width: 98%; margin: 10px auto;"
                            bgcolor="#FFFFFF">
                            <tr>
                                <td width="120px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    标题
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:TextBox ID="txtDataTitle" runat="server" class="InputSearch_x1" Width="296px"></asp:TextBox>
                                    *
                                </td>
                            </tr>
                            <tr>
                                <td width="120px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    上传文件(<asp:Label ID="LblSize" runat="server"></asp:Label>MB以内)
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:HiddenField ID="hdSaveFilePath" runat="server" />
                                    <div id="progressInfo" style="z-index: 0">
                                        <div id="spanButtonPlaceHolder">
                                        </div>
                                        <div id="divprogresscontainer" runat="server">
                                        </div>
                                        <div id="divprogressGroup" style="display: none;">
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr id="type" runat="server">
                                <td width="120px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    所属类别
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:DropDownList ID="dropType" runat="server">
                                        <asp:ListItem Text="请选择" Value=""></asp:ListItem>
                                    </asp:DropDownList>
                                    *
                                </td>
                            </tr>
                            <tr>
                                <td width="120px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    发布日期
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:TextBox runat="server" ID="txtPlusDate" class="InputSearch_x1" onkeydown="return false;"
                                        onkeypress="return false;" onpaste="return false;" oncut="return false;" onfocus="new WdatePicker({dateFmt:'yyyy-MM-dd',skin:'blue',isShowClear:true,maxDate:'2050-12-31'});"
                                        Width="70px"></asp:TextBox>*
                                </td>
                            </tr>
                            <tr>
                                <td width="120px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    内容
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <textarea id="txtNote" runat="server" cols="80" rows="10"></textarea>
                                    <script type="text/javascript" language="javascript">                                        CKEDITOR.replace('txtNote', { width: '700', height: '400' });</script>
                                </td>
                            </tr>
                            <tr>
                                <td width="120px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    显示排序
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle ">
                                    <asp:TextBox ID="txtTrans" runat="server" class="InputSearch_x1" Width="37px" Text="0"></asp:TextBox>
                                    *
                                </td>
                            </tr>
                            <tr>
                                <td width="120px" align="right" style="padding: 2px 10px 2px 10px;" valign="middle"
                                    class="tdBg1">
                                    选中继续添加
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:CheckBox ID="chkAdd" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    操作：
                                </td>
                                <td align="left" style="padding: 2px 10px 2px 10px;" valign="middle">
                                    <asp:Button ID="btnSave" runat="server" Text="添加" Style="padding: 2px 10px 3px 10px"
                                        Width="62px" CssClass="BtnSearch_x1" OnClick="btnSave_Click" />
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                        <%--</div>--%>
                    </td>
                    <td width="0" height="100%" class="Right">
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
<script src="../DemoSwfUpload/swfupload/swfupload.js" type="text/javascript"></script>
<script src="../DemoSwfUpload/js/swfupload.queue.js" type="text/javascript"></script>
<script src="../DemoSwfUpload/js/fileprogress.js" type="text/javascript"></script>
<script src="../DemoSwfUpload/js/filegroupprogress.js" type="text/javascript"></script>
<script src="../DemoSwfUpload/js/handlers.js" type="text/javascript"></script>
<script type="text/javascript">
    var swfu;

    window.onload = function () {
        var settings = {
            flash_url: "../DemoSwfUpload/swfupload/swfupload.swf",
            upload_url: "../DemoSwfUpload/DownUpload.ashx",
            file_size_limit: FileSize + "MB",
            file_types: FileExt,
            file_types_description: "Word文档",
            file_upload_limit: 0,
            file_queue_limit: 1,
            custom_settings: {

                progressTarget: "divprogresscontainer",
                progressGroupTarget: "divprogressGroup",

                //progress object
                container_css: "progressobj",
                icoNormal_css: "IcoNormal",
                icoWaiting_css: "IcoWaiting",
                icoUpload_css: "IcoUpload",
                fname_css: "fle ftt",
                state_div_css: "statebarSmallDiv",
                state_bar_css: "statebar",
                percent_css: "ftt",
                href_delete_css: "ftt",

                //sum object
                /*
                页面中不应出现以"cnt_"开头声明的元素
                */
                s_cnt_progress: "cnt_progress",
                s_cnt_span_text: "fle",
                s_cnt_progress_statebar: "cnt_progress_statebar",
                s_cnt_progress_percent: "cnt_progress_percent",
                s_cnt_progress_uploaded: "cnt_progress_uploaded",
                s_cnt_progress_size: "cnt_progress_size"
            },
            debug: false,

            // Button settings
            button_image_url: "../DemoSwfUpload/images/TestImageNoText_65x29.png",
            button_window_mode: "transparent",
            button_width: "150",
            button_height: "29",
            button_placeholder_id: "spanButtonPlaceHolder",
            button_text: '<span class="theFont">点击此处上传文件 *</span>',
            button_text_style: ".theFont { font-size: 12;color:#0068B7; }",
            button_text_left_padding: 12,
            button_text_top_padding: 3,

            // The event handler functions are defined in handlers.js
            file_queued_handler: fileQueued,
            file_queue_error_handler: fileQueueError,
            upload_start_handler: uploadStart,
            upload_progress_handler: uploadProgress,
            upload_error_handler: uploadError,
            upload_success_handler: uploadSuccess,
            upload_complete_handler: uploadComplete,
            file_dialog_complete_handler: fileDialogComplete
        };
        swfu = new SWFUpload(settings);
    };
</script>
